@extends('home.service.common')
@section('content')
<section class="pull-right">
<div class="myquestion">我的提问</div>
<form action="/home/service/dousqsnadd" method="post" enctype="multipart/form-data" >
<div class="quescontent">
	<div class="questp">
		<label class="pull-left"><span class="col-red"> * </span>问题类型：</label>
		<select name="part" id="js_provinceList" >
			<option value="-1">请选择分类</option>
							@foreach($part as $k=>$v)
     						<option value="{{$v->id}}">{{$v->partname}}</option>
     						@endforeach
					</select>
		<select class="a" name="cate" id="js_cityList">
			<option value="0">请选择问题</option>
							@foreach($cate as $k=>$v)
                            <option value="{{$v->id}}"  add="{{$v->pid}}">{{$v->catename}}</option>
                            @endforeach
		</select>
		<div class="select_box">
			<div id="categoryone" class="select_showbox">请选择分类</div>
			<div id="categorytwo" class="select_showbox">请选择问题</div>
		</div>
	</div>
	<div class="questp">
		<label class="pull-left"><span class="col-red"> * </span>问题描述：</label>
		<div class="quesrt">
			<textarea id="js_questionContent" maxlength="200" onkeyup="if (this.value.length>=200){this.value = this.value.substring(0,200)}"></textarea>
			<div>还可以输入<span id="letnumber">200</span> 字</div>
		</div>
	</div>

	<div class="questp">
		<label class="pull-left"><span class="col-gray"> * </span>相关截图：</label>
		<div class="quesrt" style="position: relative;">
			<!-- <div class="select_box qq-upload-button-selector qq-upload-button" >
				<div class="select_showbox uploadtext" id="filetext" ></div>
			</div> -->
			<!-- <input type="file" name="qqfile" onchange="getFileSize(this)"> -->
			<!-- <input type="text" id="js_uploader" class="uploader" readonly="" data-url="/user/uploadPic"><div class="ace-fileuploader-container fileuploader-container"><div class="qq-uploader"><div class="qq-upload-drop-area" style="display: none;"><span>Drop files here to upload</span></div><div class="qq-upload-button" style="position: absolute; overflow: hidden; direction: ltr; left: 246px; top: 0px;"><button type="button" class="btn">上传</button><input type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 18px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;"></div><ul class="qq-upload-list"></ul></div></div> -->
			<!-- <input type="hidden" name="imgurl" id="js_imgurl" value=""> -->
			<input type="file" name="imgurl" id="js_imgurl" >
			<!-- <a href="javascript:;" class="upload" onclick="document.getElementById('upload').submit();">上传</a> -->
			<div>上传  图片小于2M，支持jpg，gif，png，bmp格式</div>
		</div>  
	</div>
	<button type="submit" id="js_buttonSubmitQ" class="submitcon" >提交</button>
</div>
{{csrf_field()}}
</form>
</section>
<script type="text/javascript" src="/public/admin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">

    $('.a').find('option').hide();
    $('select :first').change(function(){

            var id = $(this).val();
            $('.a').find('option').hide();
            $('.a').find('option[add='+id+']').show();
        })	
		



    </script>
@endsection